<template>
  <!-- 重复dialog-->
  <el-dialog
    title="重复告警"
    :visible="visible"
    :before-close="resetFun"
    class="dialog-class3"
    @open="openRepeat"
  >
    <el-form
      label-width="100px"
      :style="{ '--theme': $store.getters.themeColor }"
      :rules="rules"
      ref="myForm"
      :model="qryParams"
    >
      <el-row>
        <el-col :span="8">
          <el-form-item label="事件编号" :label-width="labelWidth">
            <el-input
              v-model.trim="qryParams.orderId"
              placeholder="请输入"
              clearable
            ></el-input
          ></el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="告警类型" :label-width="labelWidth">
            <el-select
              v-model="qryParams.eventType"
              placeholder="请选择"
              collapse-tags
              size="small"
              clearable
              filterable
              multiple
            >
              <el-option
                v-for="(item, index) in selectDataSource.eventTypeList"
                :key="index"
                :value="item.typeValue"
                :label="item.typeName"
              >
              </el-option> </el-select
          ></el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="时间范围" :label-width="'70px'">
            <el-date-picker
              prefix-icon="el-icon-date"
              :editable="false"
              :clearable="false"
              class="timeClass"
              value-format="yyyy-MM-dd HH:mm:ss"
              :picker-options="pickerOptions"
              v-model="qryParams.warnTime"
              type="datetimerange"
              range-separator="至"
              popper-class="warnTime"
              start-placeholder="开始时间"
              end-placeholder="结束时间"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item prop="spaceRange" :label-width="labelWidth">
            <template slot="label">
              <span class="label-title">空间范围</span>
              <el-tooltip placement="top" effect="dark">
                <button
                  class="circleButton"
                  style="margin-right: 2px"
                  type="button"
                >
                  ?
                </button>
                <template slot="content">
                  <p>
                    空间范围以当前告警经纬度为中心，输入的距离为半径的圆形范围，最大值为10000米。
                  </p>
                </template>
              </el-tooltip>
            </template>
            <el-input v-model="qryParams.spaceRange" placeholder="请输入">
              <template slot="append">
                <span class="append">米</span>
              </template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item class="pt-range" :label-width="labelWidth">
            <template slot="label">
              <span class="label-title">PT范围</span>
              <el-tooltip placement="top" effect="dark">
                <button
                  class="circleButton"
                  style="margin-right: 2px"
                  type="button"
                >
                  ?
                </button>
                <template slot="content">
                  <p>
                    PT范围是以当前告警的告警框图中心点为中心，±ΔP和±ΔT的矩形
                  </p>
                  <p>
                    范围，ΔP范围值为0~90，ΔT范围值为0~90。请注意：此条件将查
                  </p>
                  <p>询同一摄像机的AI告警、摄像机告警并且PTZ有值的告警列表。</p>
                </template>
              </el-tooltip>
            </template>
            <div style="display: flex; align-items: center; flex-wrap: nowrap">
              <el-form-item prop="alarmRangeP">
                <el-input v-model="qryParams.alarmRangeP" placeholder="请输入">
                  <template slot="prepend"> ΔP </template>
                </el-input>
              </el-form-item>
              <el-form-item prop="alarmRangeT">
                <el-input v-model="qryParams.alarmRangeT" placeholder="请输入">
                  <template slot="prepend"> ΔT </template>
                </el-input>
              </el-form-item>
            </div>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="text-align: right">
          <el-form-item label="研判结果" :label-width="'70px'">
            <el-select v-model="qryParams.judgeResult" disabled>
              <el-option label="真警" value="真警"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <div class="btn-box">
        <el-button
          v-hasPermi="['event:alarm:query']"
          type="primary"
          size="small"
          icon="el-icon-search"
          class="fs-14 search-btn"
          @click="queryEventData()"
          >查 询</el-button
        >
        <el-button
          v-hasPermi="['event:alarm:reset']"
          size="small"
          class="fs-14"
          icon="el-icon-refresh-left"
          @click="resetData()"
          >重 置</el-button
        >
      </div>
    </el-form>
    <el-table
      :data="tableData"
      ref="table"
      :header-cell-style="headerCellStyle"
      @selection-change="handleCurrentChange"
      class="single-select-table"
      border
      style="width: 100%"
      size="medium"
    >
      <el-table-column
        type="selection"
        width="45"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="orderId"
        label="事件编号"
        width="220"
        align="center"
      >
        <template slot-scope="scope">
          <div
            style="color: #4a90e2; cursor: pointer"
            @click="numClick(scope.row)"
          >
            {{ scope.row.orderId }}
          </div>
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        prop="alarmBody"
        label="事件标题"
        width="100"
      ></el-table-column>
      <el-table-column
        prop="warningTypeName"
        label="告警类型"
        width="100"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="alarmTime"
        label="告警时间"
        width="160"
        align="center"
        :formatter="timeFormat"
      ></el-table-column>
      <el-table-column
        prop="address"
        label="事发地点"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="orderStatusName"
        label="状态"
        align="center"
        width="80"
      ></el-table-column>
      <el-table-column label="操作" width="80" align="center">
        <template slot-scope="scope">
          <el-button type="text" size="mini" @click="numClick(scope.row)"
            ><span class="iconfont icon-chakan" style="font-size: 14px"></span>
            <span style="font-size: 14px">查看</span>
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      style="text-align: right; margin-top: 10px; margin-right: -10px"
      class="custoom-page"
      layout="prev, pager, next"
      :page-size="pageSize"
      :current-page="cuurPageNum"
      :total="total"
      @current-change="tableCurrentChange"
      background
    >
    </el-pagination>
    <el-row
      v-if="
        tableData.length > 0 && ['1', '4'].includes(orderData.warningSource)
      "
    >
      <div class="footerStyle">
        <div class="label">
          是否告警压制
          <el-tooltip effect="dark" placement="top">
            <div slot="content">
              如开启告警压制，将按照同一设备同一告警类型在规定时间内进行压制处理，<br />压制的告警将放到回收站中
            </div>
            <div class="text">?</div>
          </el-tooltip>
        </div>

        <el-switch
          v-model="suppress"
          active-text=""
          inactive-text=""
        ></el-switch>
        <div class="label" v-if="suppress">
          <div>
            <el-radio-group v-model="suppressTime" @change="timeChange()">
              <el-radio :label="1">5分钟不再告警</el-radio>
              <el-radio :label="2">1小时不再告警</el-radio>
              <el-radio :label="3">今天不再告警</el-radio>
            </el-radio-group>
          </div>
          <span>
            <el-radio-group v-model="suppressTime" class="custom-group">
              <el-radio :label="4">自定义</el-radio>
            </el-radio-group>
          </span>
          <span class="input-custom">
            <el-input
              :disabled="suppressTime != 4"
              v-model="inputDay"
              placeholder="请输入"
              oninput="value=value.replace(/[^\d]/g,'');if(value>30)value=30;if(value.length>2)value=value.slice(0,2)"
              style="width: 120px; margin-left: 12px"
            >
              <template slot="append">天</template>
            </el-input>
            <el-input
              :disabled="suppressTime != 4"
              v-model="inputHours"
              placeholder="请输入"
              oninput="value=value.replace(/[^\d]/g,'');if(value>24)value=24;if(value.length>2)value=value.slice(0,2)"
              style="width: 120px; margin-left: 12px"
            >
              <template slot="append">小时</template>
            </el-input>
            <el-input
              :disabled="suppressTime != 4"
              v-model="inputMin"
              placeholder="请输入"
              oninput="value=value.replace(/[^\d]/g,'');if(value>60)value=60;if(value.length>2)value=value.slice(0,2)"
              style="width: 120px; margin-left: 12px"
            >
              <template slot="append">分钟</template>
            </el-input>
          </span>
        </div>
      </div>
    </el-row>
    <div slot="footer" class="dialog-footer" style="padding-right: 5px">
      <el-button
        class="fs-14"
        style="margin-right: 10px"
        @click="submitFun()"
        type="primary"
        :disabled="tableData.length === 0"
        >确 定
      </el-button>
      <el-button class="fs-14" @click="resetFun">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { DateFormat, $getUrlParam } from "@/utils/public";
import {
  getOrderListForDuplication,
  checkAlarmOrder,
} from "@/api/modules/eventManagement/eventDialog/repeatDialog";
import { createIntercept } from "@/api/modules/eventManagement/eventDialog/falseWarnDialog";
import { findOrderAlarm } from "@/api/modules/eventManagement/eventManagement";
import { getQueryString } from "@/utils/common";
import { $store } from "@/utils/store";
let repeatTime = "";
export default {
  name: "repeatDialog",
  data() {
    return {
      /* intervalTime: '',
        intervalDay: '',
        intervalHour: '',
        intervalMinute: '',
        intervalType: '',
        isOpen: false, */
      inputDay: "",
      inputHours: "",
      inputMin: "",
      suppress: false,
      suppressTime: "",
      labelWidth: "80px",
      qryParams: {
        //查询入参
        orderId: "",
        eventType: [], //告警类型
        warnTime: [], // 时间范围
        spaceRange: "3000", // 空间范围
        alarmRangeP: "",
        alarmRangeT: "",
        judgeResult: "真警",
      },
      selectDataSource: {
        eventTypeList: [],
      },
      multipleSelection: [],
      tableData: [],
      pageSize: 10,
      cuurPageNum: 1,
      total: 0,
      pickerOptions: {
        onPick: ({ maxDate, minDate }) => {
          repeatTime = minDate.getTime();
          if (maxDate) {
            repeatTime = "";
          }
        },
        disabledDate(time) {
          let choiceDateTime = new Date(repeatTime).getTime();
          const minTime =
            new Date(choiceDateTime).getTime() - 30 * 24 * 60 * 60 * 1000;
          const maxTime =
            new Date(choiceDateTime).getTime() + 30 * 24 * 60 * 60 * 1000;
          let nowDate = new Date(new Date().toLocaleDateString() + " 23:59:59");
          const min = minTime;
          const max = nowDate.getTime() < maxTime ? nowDate.getTime() : maxTime;
          //如果已经选中一个日期，则返回该日期前后一个月时间可选
          if (repeatTime) {
            return time.getTime() < min || time.getTime() > max;
          }
          return time.getTime() > nowDate.getTime();
        },
      },
      rules: {
        spaceRange: [
          {
            pattern: /^[1-9]\d{0,3}$|^10000$/,
            message: "请输入1-10000的正整数",
            trigger: "blur",
          },
        ],
        alarmRangeP: [
          {
            pattern: /^(90(\.0{1,2})?|([1-8][0-9]|[0-9])(\.\d{1,2})?)$/,
            message: "请输入0-90之间的数字",
            trigger: "blur",
          },
        ],
        alarmRangeT: [
          {
            pattern: /^(90(\.0{1,2})?|([1-8][0-9]|[0-9])(\.\d{1,2})?)$/,
            message: "请输入0-90之间的数字",
            trigger: "blur",
          },
        ],
      },
    };
  },
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    orderData: {
      type: Object,
      default: () => {},
    },
  },
  methods: {
    /* changeSwitch(val){
        console.log(val)
        this.isOpen = val;
      }, */

    /**
     * 录像计划 列表 翻页触发
     */
    tableCurrentChange(pageNum) {
      this.tableDataFun(pageNum);
    },
    onLoadData_type() {
      let _this = this;
      findOrderAlarm({}).then((result) => {
        if (result.code === 200) {
          _this.selectDataSource.eventTypeList = result.data;
        }
      });
    },
    openRepeat() {
      this.getDefaultWarnTime();
      this.tableDataFun(1);
    },
    //表格数据
    tableDataFun(pageNum) {
      this.onLoadData_type();

      if (pageNum === undefined) {
        pageNum = 1;
        this.total = 0;
      }
      //经纬度
      this.queryEventData(pageNum);
    },
    resetData() {
      this.qryParams = {
        orderId: "", //事件编号
        eventType: [], //告警类型
        spaceRange: "3000", //空间范围
        alarmRangeP: "", //P范围
        alarmRangeT: "", //T范围
        judgeResult: "真警",
      };
      this.getDefaultWarnTime();
      this.queryEventData(1);
    },
    queryEventData(pageNum) {
      //经纬度
      let params = {
        transPan: this.orderData.transPan,
        transTitle: this.orderData.transTitle,
        transZoom: this.orderData.transZoom,
        modelId: this.orderData.modelId,
        focusRange: this.orderData.focusRange,
        vertiDownNeg: this.orderData.vertiDownNeg,
        warnSource: this.orderData.warningSource,
        devCode: this.orderData.deviceCode,
        longitude: this.orderData.longitude,
        latitude: this.orderData.latitude,
        alarmRangeP: this.qryParams.alarmRangeP,
        alarmRangeT: this.qryParams.alarmRangeT,
        orderId: this.qryParams.orderId,
        warningTypeIdList: this.qryParams.eventType,
        alarmTimeStart: this.qryParams.warnTime[0] || "",
        alarmTimeEnd: this.qryParams.warnTime[1] || "",
        spaceRange: this.qryParams.spaceRange,
        pageNum: pageNum,
        pageSize: this.pageSize,
      };
      this.$nextTick(() => {
        this.$refs["myForm"].validate((valid) => {
          if (valid) {
            getOrderListForDuplication(params).then((resp) => {
              this.tableData = [];
              if (resp && resp.code == 200) {
                this.cuurPageNum = 1;
                this.total = resp.total || 0;
                this.tableData = resp.rows || [];
              }
            });
          } else {
            $message.error("查询条件有误");
          }
        });
      });
    },
    //时间格式化
    timeFormat(row) {
      if (row != null) {
        return DateFormat.utcTimeToStrTime(row.alarmTime);
      }
    },
    //区域进行拼接
    // areaFormat(row) {
    //   return row.provinceName + row.cityName + row.countyName + row.address;
    // },
    //经纬度进行拼接
    positionFormat(row) {
      let position =
        (row.longitude ? parseFloat(row.longitude).toFixed(6) + "," : "") +
        (row.latitude ? parseFloat(row.latitude).toFixed(6) : "");
      return position;
    },
    //点击事件编码按钮
    numClick(row) {
      this.$router.push({
        path: "/eventLinks",
        query: {
          oldOrderId: this.orderData.warningOrderId,
          oldList: getQueryString("list"),
          orderId: row.orderId,
          type: 3,
          orderStatus: row.orderStatus,
          list: JSON.stringify(
            this.tableData?.map(({ orderId, orderStatus }) => ({
              orderId,
              orderStatus,
            }))
          ),
        },
      });
    },
    timeChange() {
      this.inputDay = "";
      this.inputHours = "";
      this.inputMin = "";
    },
    //提交
    submitFun() {
      let _this = this;

      if (_this.multipleSelection.length > 0) {
        if (this.suppress) {
          if (this.suppressTime.length == 0) {
            $message.warning("请选择告警压制时间！");
            return;
          }
          if (this.suppressTime == "4") {
            if (
              this.inputDay.length == 0 &&
              this.inputHours.length == 0 &&
              this.inputMin.length == 0
            ) {
              $message.warning("请选择告警压制时间！");
              return;
            }

            if (this.inputDay == 30) {
              if (this.inputHours > 0 || this.inputMin > 0) {
                $message.warning("告警压制时间最少为1分钟，最多为30天！");
                return;
              }
            }
            if (this.inputDay == 0) {
              if (this.inputHours == 0 && this.inputMin == 0) {
                $message.warning("告警压制时间最少为1分钟，最多为30天！");
                return;
              }
            }
          }
          let suppressTemp = "";
          if (this.suppressTime == "1") {
            suppressTemp = 5;
          }
          if (this.suppressTime == "2") {
            suppressTemp = 60;
          }
          if (this.suppressTime == "3") {
            suppressTemp = 1440;
          }
          if (this.suppressTime == "4") {
            suppressTemp =
              this.inputDay * 1440 + this.inputHours * 60 + this.inputMin * 1;
          }

          let timeParams = {
            appVerCode: this.$store.getters.userInfo.chooseAppVerCode,
            deviceCode: this.orderData.deviceCode,
            warningTypeId: this.orderData.warningTypeId,
            interceptTime: suppressTemp,
          };

          createIntercept(timeParams).then((res) => {
            if (res.code == 200) {
            } else {
              $message.warning(res.msg);
              return false;
            }
          });
        }
        let params = {
          orderId: this.orderData.warningOrderId,
          warningOrderId: this.orderData.warningOrderId,
          orderStatus: "7", //0-假警、2-真警、7-重复报警
          linkId: "7",
          remark: "", //虚假告警说明，假警时必填
          checkMan: $store.get("$loginInfo").userId, //研判人员ID
          duplicateOrderId: _this.multipleSelection[0].orderId, //重复的告警单ID，重读告警时必填
          devicePitch: this.orderData.devicePitch, // 俯仰角
          alarmReason: this.orderData.alarmReason, // 告警原因
          deviceHorizontal: this.orderData.deviceHorizontal, // 水平角
          //"intervalType" : _this.intervalType,//1: 5分钟不再告警  2: 1小时不再告警  3: 今日不再告警  4: 自定义
        };
        /* if (_this.intervalType == '4') {
            let minute1 = _this.intervalDay * 60 * 60;
            let minute2 = _this.intervalHour * 60;
            let minute3 = _this.intervalMinute;
            params.intervalTime = minute1 + minute2 + minute3;
          } */
        params.isNextLink = "1";
        params.isSign = "0";
        params.processDTOList = [];
        params.realLinkType = "7";
        params.flowLinkType = "0";
        if (this.orderData.updateAddress) {
          params.address = this.orderData.address;
          params.longitude = this.orderData.longitude;
          params.latitude = this.orderData.latitude;
          params.gridId = this.orderData.gridId;
          params.gridName = this.orderData.gridName;
          params.horiAzimuthAngle = this.orderData.horiAzimuthAngle;
          params.checkGridFlag = "1"; // 是否修改网格员  1 是  0 否
        } else {
          params.checkGridFlag = "0";
        }
        params.warningTypeId = this.orderData.warningTypeId;
        checkAlarmOrder(params).then((resp) => {
          let msgId = {
            id: this.orderData.warningOrderId,
            status: this.orderData.orderStatus,
          };
          this.$store.dispatch("closeSocketMsg", msgId);
          if (resp && resp.code == 200) {
            $message.success("研判成功");
            _this.onSuccess();
          } else {
            $message.warning(resp.msg);
          }
        });
      } else {
        $message.warning("请选择一条数据！");
        // $v.message({
        //   message: "请选择一条数据！"
        // });
        return;
      }
      _this.$emit("update:visible", false);
    },
    onSuccess() {
      const url =
        $getUrlParam("pageType") === "false"
          ? "/eventManagement"
          : "/eventManagement/myEvent";
      this.$close(url);
    },
    resetFun() {
      this.intervalType = "";
      this.isOpen = false;
      this.$refs.table.clearSelection();
      this.suppressTime = null;
      this.suppress = false;
      this.inputMin = "";
      this.inputDay = "";
      this.inputHours = "";
      this.$emit("update:visible", false);
    },
    //表头样式
    headerCellStyle({ row, column, rowIndex, columnIndex }) {
      return (
        "font-size: 14px;\n" +
        "font-family: PingFangSC-Regular, PingFang SC;\n" +
        "font-weight: 400;\n" +
        "color: #666;\n" +
        "background-color: #F8F8F8;\n" +
        "line-height: 20px;"
      );
    },
    handleCurrentChange(val) {
      this.multipleSelection = val;
      // 单选
      if (val.length > 1) {
        this.$refs.table.clearSelection();
        this.$refs.table.toggleRowSelection(val.pop());
      }
    },
    /**
     * 获取默认告警时间
     */
    getDefaultWarnTime() {
      repeatTime = "";
      let warnTime = [];
      let sixHours = 6 * 60 * 60 * 1000; // 6个小时的毫秒数
      let nowDate = new Date().getTime();
      let beforeDate = nowDate - sixHours;
      warnTime.push(new Date(beforeDate).toLocaleString().replace(/\//g, "-"));
      warnTime.push(new Date(nowDate).toLocaleString().replace(/\//g, "-"));
      this.qryParams.warnTime = warnTime;
      this.qryParams = JSON.parse(JSON.stringify(this.qryParams));
    },
  },
};
</script>

<style lang="scss" scoped>
// .timeInput /deep/ .el-input__inner{
//   height: 32px;
// }
//  .timeInput /deep/ .el-input.is-disabled .el-input__inner{
//    border: 0.1em solid #EAEAEA;
//  }
// .timeInput /deep/ .el-input-group__append{
//   margin-right: 30px;
//   padding: 0px 5px;
//   width: 44px;
// }
// .timeInput{
//   margin-right: 0px;
// }
// .switch /deep/ .el-switch__label {
//     position: absolute;
//     display: none;
//     color: #fff !important;
// }
// /*打开时文字位置设置*/
// .switch /deep/ .el-switch__label--right {
//     z-index: 1;
// }
// /* 调整打开时文字的显示位子 */
// .switch /deep/ .el-switch__label--right span{
//     margin-left: -4px;
// }
// /*关闭时文字位置设置*/
// .switch /deep/ .el-switch__label--left {
//     z-index: 1;
// }
// /* 调整关闭时文字的显示位子 */
// .switch /deep/ .el-switch__label--left span{
//     margin-left: 20px;
// }
// /*显示文字*/
// .switch /deep/ .el-switch__label.is-active {
//     display: block;
// }
// /* 按钮样式start */
// .line {
//   height: 1px;
//   border: 1px dashed #B4BDC5;
//   margin-top: 3vh;
//   margin-bottom: 3vh;
//   margin-right: 3vh;
// }
.right {
  margin-right: 50px;
  margin-bottom: 25px;
}

.el-image {
  border-radius: 15px;
  width: 100%;
  height: 170px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.video {
  /*width: 365px;*/
  height: 165px;
  background: #22222c;
  box-shadow: 0px 10px 12px 2px rgba(213, 210, 233, 0.59);
  border-radius: 15px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.map {
  /*width: 365px;*/
  height: 165px;
  box-shadow: 0px 10px 12px 3px rgba(213, 210, 233, 0.6);
  border-radius: 15px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/*-----------------------------------dialog样式------------------------------*/
/deep/ .el-dialog__body {
  text-align: center;
}
// /deep/.el-dialog__body .el-form-item .el-form-item__label {
//   line-height: 32px;
//   color: black;
//   font-weight: 700;
// }

/deep/.el-dialog__body .el-input--small .el-input__inner {
  height: 32px;
}
/deep/ .el-dialog {
  background: #ffffff;
  width: 1200px;
  border-right: 4px;
}

/deep/ .el-dialog__header {
  background: white;
  display: inline-block;
  border-radius: 4px;
  padding: 12px;
}

// .dialog-class3 span {
//   width: 392px;
//   height: 20px;
//   font-size: 14px;
//   font-family: PingFangSC-Regular, PingFang SC;
//   font-weight: 400;
//   color: #ff6a6c;
//   line-height: 20px;
//   float: left;
//   margin-bottom: 20px;
// }

/deep/ .el-textarea {
  margin-top: 16px;
}
/deep/ .el-table__header-wrapper .el-checkbox {
  //找到表头那一行，然后把里面的复选框隐藏掉
  display: none;
}

// /deep/ .el-table th > .cell {
//   font-size: 14px;
//   font-family: PingFangSC-Regular, PingFang SC;
//   font-weight: 400;
//   color: #333333;
//   line-height: 20px;
// }

// /deep/ .el-table .cell {
//   font-size: 14px;
//   font-family: PingFangSC-Regular, PingFang SC;
//   font-weight: 400;
//   color: #999999;
//   line-height: 20px;
// }
/deep/ .submitClass {
  background: #ff6a6c !important;
  color: #ffffff !important;
}
.custoom-page {
  text-align: center;
}
.question {
  width: 14px;
  height: 40px;
  margin-left: 10px;
  display: flex;
  flex-wrap: nowrap;
}
.text {
  width: 14px;
  height: 14px;
  background: #ffa940;
  border-radius: 7px;
  line-height: 14px;
  color: #ffffff;
  font-size: 12px;
  margin: auto;
  text-align: center;
  display: inline-block;
}
/deep/ .el-form-item__content {
  text-align: left;
}
// /deep/ .el-switch {
//   vertical-align: top;
// }
/deep/ .el-input.is-disabled .el-input__inner {
  border: 1px solid #dcdfe6 !important;
}

/deep/ .el-table__row {
  .el-checkbox__inner {
    border-radius: 50%;
  }
}

/deep/ .el-switch {
  .el-switch__label.is-active {
    display: none;
  }

  .el-switch__label--left {
    position: absolute;
    z-index: 1;
    left: 5px;
    margin-right: 0px;
    color: #fff;
    line-height: 19px;
    span {
      font-size: 12px;
    }
  }

  .el-switch__label--right {
    position: absolute;
    z-index: 1;
    right: 6px;
    margin-left: 0px;
    color: #fff;
    line-height: 19px;
    span {
      font-size: 12px;
    }
  }
}

/deep/ .el-radio {
  margin-right: 24px;

  &:last-child {
    margin-right: 24px;
  }
}

.custom-group {
  /deep/ .el-radio {
    &:last-child {
      margin-right: 0px;
    }
  }
}

/deep/ .el-dialog > .el-dialog__body {
  //padding-left: 27px;
  //padding-right: 21px;
  padding: 12px;
}

/deep/.input-custom .el-input input {
  padding: 0 !important;
  text-align: center;
}
/deep/.el-input-group__append {
  width: 40px;
  padding: 0;
  text-align: center;
  background-color: #f6f3f7;
}
.label-title {
  font-family: PingFangSC, PingFang SC !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  color: #606266 !important;
}

.circleButton {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background-color: #ffa940;
  color: white;
  font-size: 12px;
}
/deep/.pt-range > .el-form-item__content {
  padding: 0;
}
.pt-range {
  margin-bottom: 0 !important;
}
.fs-14 {
}
/deep/.el-form-item__content {
  padding-right: 0;
}
/deep/ .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
  background-color: #f5f7fa !important;
  // border: 1px solid #EBEEF5;
}
.timeClass /deep/.el-range__close-icon {
  display: none;
}
.btn-box {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.search-btn {
  margin-right: 12px;
}
.footerStyle {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 12px;
  .label {
    display: inline-flex;
    align-items: center;
    .text {
      margin-left: 6px;
    }
  }
  .el-switch {
    margin: 0px 32px 0px 12px;
  }
}
/deep/ .el-form-item__label {
  font-family: PingFangSC, PingFang SC !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  color: #606266 !important;
}
</style>
